package fr.univ.context.data.entity;

import android.content.ContentValues;
import fr.univ.context.data.handler.EntityBase;
import fr.univ.context.data.table.RunningApplicationTable;

/**
 * @Entity
 * @Table (name = "exec_applications")*/

public class RunningApplication extends EntityBase {
	
	/**
	 * @Column (name = "app_name") 
	 * Android app's name */
	private String appName;
	
	/**
	 * @Column (name = "process_name") 
	 * The name of the process where the service is to run. */
	private String processName;
	
	
	public RunningApplication(String appName, String processName, String completeDate){
		super(completeDate);
		this.appName = appName;
		this.processName = processName;
	}
	
	public String getAppName() {
		return appName;
	}

	public void setAppName(String appName) {
		this.appName = appName;
	}

	public String getProcessName() {
		return processName;
	}

	public void setProcessName(String processName) {
		this.processName = processName;
	}
	
	@Override
	/**
	 * Get ContentValues
	 * @return Object ContentValues with the values of this entity.*/
	public ContentValues getContentValues() {
		
		ContentValues cv = new ContentValues();
		
		cv.put(RunningApplicationTable.COLUMNS[1], getAppName());
		cv.put(RunningApplicationTable.COLUMNS[2], getProcessName());
		cv.put(RunningApplicationTable.COLUMNS[3], getCompleteDate());
		
		return cv;
	}
}
